import Taro, {Component} from '@tarojs/taro'
import {View} from '@tarojs/components'
import {AtIcon} from 'taro-ui'
import './index.scss'

export default class TopicAndMore extends Component {
  constructor(props) {
    super(props)
  }
  handleMoreClick = () => {
    this.props.data.handleMoreClick()
  }

  render () {
    const {data} = this.props;
    console.log(data)
    if (data) {
      return (
        <View className='content'>
          <View className='topic'>{data.title}</View>
          <View
            className='more'
            onClick={this.handleMoreClick}
          >查看
            <AtIcon value='chevron-right' size='12' color='#39958C'/>
          </View>
        </View>
      );
    }
    return null

  }
}
